Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> ::-moz-selection { /* Code for Firefox */ color: red; background: yellow; } ::selection { color: red; background: yellow; } </style> </head> <body> <h1>Select some text on this page:</h1> <p>This is a paragraph.</p> <div>This is some text in a div element.</div> <p><strong>Note:</strong> ::selection is not supported in Internet Explorer 8 and earlier versions.</p> <p><strong>Note:</strong> Firefox supports an alternative, the ::-moz-selection property.</p> </body> <!-- Mirrored from www.w3schools.com/css/tryit.asp?filename=trycss3_selection by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:33:13 GMT --> </html>
Result:
Try it Yourself - © w3schools.com